// 部分样式来源于其他开源UI库
@import '@vavt/markdown-theme/css/all.css';
@import '~/styles/vars.less';
@import '~~/MdCatalog/index.less';

.basic-style() {
  color: var(--md-color);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', system-ui,
    ui-sans-serif, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
}

.@{prefix} {
  .css-vars(false);
  .basic-style();

  width: 100%;
  height: 500px;
  position: relative;
  box-sizing: border-box;
  border: 1px solid var(--md-border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--md-bk-color);

  .@{prefix}-fullscreen {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto !important;
    height: auto !important;
    z-index: 10000;
  }

  svg&-icon {
    width: 16px;
    height: 16px;
    padding: 4px;
    fill: none;
    overflow: hidden;
    display: block;
    box-sizing: content-box;
  }

  // 特殊处理这三个图标大小
  .lucide-list-icon,
  .lucide-list-ordered-icon,
  .lucide-list-todo-icon {
    width: 18px;
    height: 18px;
    padding: 3px;
  }

  &-preview {
    font-size: 16px;
    word-break: break-all;
    // 需要设置为bfc，父级才能正确获取到滚动高度
    display: flow-root;
    padding: 10px 20px;
  }
}

.@{prefix}-modal-container {
  .css-vars(false);
  .basic-style();

  .lucide-xicon {
    width: 20px;
    height: 20px;
    padding: 2px;
  }
}

.@{prefix}-previewOnly {
  border: none;
  height: auto;
  overflow: visible;

  .@{prefix}-content {
    height: 100%;
  }

  .@{prefix}-preview {
    padding: 0;
  }

  .@{prefix}-preview-wrapper {
    overflow: visible;
  }
}

.@{prefix}-dark,
.@{prefix}-modal-container[data-theme='dark'] {
  .css-vars(true);
}

// 图片预览优先级高于编辑器，低于编辑器弹窗
.medium-zoom-overlay,
.medium-zoom-image--opened {
  z-index: 100001;
}
